<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>

    <p id="123">hello,world!</p>
   <div> <button onClick="setred()">变为红色</button></div>
   <div>  <button onclick="undo()">复原</button></div>
    <script >
        function setred() {
                 document.getElementById("123").style.color = "red";
             }
             
             function undo() {
                 document.getElementById("123").style.color = "black";
             }
     </script> 
   
</body>
</html>